<% layout('/layout/default.html', {title: '流程表单业务', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-cubes"></i> 流程表单业务
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>
				<% if(hasPermi('flowable:flowFormBusiness:edit')){ %>
					<a href="/flowable/flowFormBusiness/form" class="btn btn-default btnTool"  title="新增流程表单业务"><i class="fa fa-plus"></i> 新增</a>
				<% } %>
			</div>
		</div>
		<div class="box-body">
			<form id="searchForm" action="${ctx}/flowable/flowFormBusiness/listData" method="post" class="form-inline hide" >
				<div class="form-group">
					<label class="control-label">表单编号：</label>
					<div class="control-inline">
						<input name="formId"  maxlength="64" class="form-control"/>
					</div>
				</div>
				
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">查询</button>
					<button type="reset" class="btn btn-default btn-sm">重置</button>
				</div>
			</form>			
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
//初始化layui-table对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'表单编号', name:'formId', index:'a.form_id', width:90, align:"center"},
		{header:'流程实例ID', name:'procInsId', index:'a.proc_ins_id', width:90, align:"center"},
		{header:'更新时间', name:'updateDate', index:'a.update_date', width:90, align:"center"},
		{header:'备注信息', name:'remarks', index:'a.remarks', width:90, align:"center"},
		{header:'操作', name:'actions', width:100, sortable:false, title:false, align:"center",formatter: function(val, obj, row, act){
			var actions = [];
			<% if(hasPermi('flowable:flowFormBusiness:edit')){ %>
				actions.push('<a href="/flowable/flowFormBusiness/form?id='+row.id+'" class="btnList" title="编辑流程表单业务"><i class="fas fa-pencil-alt"></i></a>&nbsp;');
				actions.push('<a href="${ctx}/flowable/flowFormBusiness/delete?id='+row.id+'" class="btnList" title="删除流程表单业务" data-confirm="确认要删除该流程表单业务吗？"><i class="far fa-trash-alt"></i></a>&nbsp;');
			<% } %>
			
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});

</script>